package display;

import java.awt.Graphics;
import java.awt.event.MouseEvent;
import java.awt.event.MouseListener;

import javax.swing.JPanel;

import level.Manager;

/**
 * Handling of the levels (ingame) actions....
 *
 * @author Neil Cowzer
 */
public class InGame extends JPanel implements MouseListener{
    /** location of level file */
    private String url;
    
    /** whether or not the game is running */
    private boolean running;
    
    /** whether or not the level has been completed */
    private boolean complete;
    
    
    /**
     * Create an image
     *
     * @param url the location of the level file
     */
    public InGame(String url){
        this.url = url;
        complete = false;
        running = true;
    }
    
    /** Check the status of the level */
    public /*@ pure @*/ boolean complete(){
    	return complete;
    }
    
    /** Initalise the terrain of the level and other particulars of the level. */
    public void init(){
        // read xml file init appropiate
    		
    }
    
    /** Perform the logic of the game */
    public void logic(){
        
    }
    
    /** Overide the paint method */
    public void paintComponent (Graphics g) {
        // First paint background
        super.paintComponent (g);
        
        // paint all stuff here
        
    }
    
    /** Run the game */
    public void run(){
        
    }
    
    /** Handle mousePressed event */
    public void mousePressed(MouseEvent e) {
       
    }

    /** Handle mouseReleased event */
    public void mouseReleased(MouseEvent e) {
       
    }

    /** Handle mouseEntered event */
    public void mouseEntered(MouseEvent e) {
    
    }

    /** Handle mouseExited event */
    public void mouseExited(MouseEvent e) {
       
    }

    /** Handle mouseClicked event */
    public void mouseClicked(MouseEvent e) {
      
    }
}
